<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>首页</title>

  <!-- Favicons -->
  <link href="../img/favicon.png" rel="icon">
  <link href="/img/apple-touch-icon.png" rel="apple-touch-icon">

  <!-- Bootstrap core CSS -->
  <link href="../lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <!--external css-->
  <link href="../lib/font-awesome/css/font-awesome.css" rel="stylesheet" />
  <link rel="stylesheet" type="text/css" href="../css/zabuto_calendar.css">
  <link rel="stylesheet" type="text/css" href="../lib/gritter/css/jquery.gritter.css" />
  <!-- Custom styles for this template -->
  <link href="../css/style.css" rel="stylesheet">
  <link href="../css/style-responsive.css" rel="stylesheet">
  <script src="../lib/chart-master/Chart.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.10/vue.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/axios/1.5.0/axios.js"></script>
</head>

<body>
  <section id="container">
    <header class="header black-bg">
      <div class="sidebar-toggle-box">
        <div class="fa fa-bars tooltips" data-placement="right" data-original-title="Toggle Navigation"></div>
      </div>
      <a href="/page/index.html" class="logo"><b>药企内部<span>管理系统</span></b></a>
      <div class="top-menu">
        <ul class="nav pull-right top-menu">
          <li><a class="logout" href="../login.html">Logout</a></li>
        </ul>
      </div>
    </header>
    <aside>
      <div id="sidebar" class="nav-collapse ">
        <!-- sidebar menu start-->
        <ul class="sidebar-menu" id="nav-accordion">
          <p class="centered">
            <!-- <img src="/medical-page/img/ny.jpg" class="img-circle" width="80"> -->
            <img :src="userImage" class="img-circle" width="80">
          </p>
          <h5 class="centered">{{userName}}</h5>
          <li class="sub-menu">
            <a href="javascript:;">
              <i class="fa fa-user"></i>
              <span>用户管理</span>
            </a>
            <ul class="sub">
              <li><a href="/page/user/list.html">用户列表</a></li>
              <li><a href="buttons.html">职务权限</a></li>
            </ul>
          </li>
        </ul>
        <!-- sidebar menu end-->
      </div>
    </aside>
    <!--sidebar end-->
    <!-- **********************************************************************************************************************************************************
        MAIN CONTENT
        *********************************************************************************************************************************************************** -->
    <!--main content start-->
    <section id="main-content">
      <section class="wrapper">
        <div style="font-size: 100px; margin-left: 36%; margin-top: 200px;">
          <i>welcome</i>
        </div>
      </section>
    </section>
    <!--main content end-->
  </section>
  <!-- js placed at the end of the document so the pages load faster -->
  <script src="../lib/jquery/jquery.min.js"></script>

  <script src="../lib/bootstrap/js/bootstrap.min.js"></script>
  <script class="include" type="text/javascript" src="../lib/jquery.dcjqaccordion.2.7.js"></script>
  <script src="../lib/jquery.scrollTo.min.js"></script>
  <script src="../lib/jquery.nicescroll.js" type="text/javascript"></script>
  <script src="../lib/jquery.sparkline.js"></script>
  <!--common script for all pages-->
  <script src="../lib/common-scripts.js"></script>
  <script type="text/javascript" src="../lib/gritter/js/jquery.gritter.js"></script>
  <script type="text/javascript" src="../lib/gritter-conf.js"></script>
  <!--script for this page-->
  <script src="../lib/sparkline-chart.js"></script>
  <script src="../lib/zabuto_calendar.js"></script>
<script>
  let vue=new Vue({
    el:"#container",
    data:{
      userName:"",
      userImage:"",
    },
    created() {
      //获得登录页面跳转到首页携带的数据
      //第1种方式获得
      // let params =new URLSearchParams(window.location.search);
      // //console.log(params.get("name"));
      // //console.log(params.get("image"));
      // this.userName=params.get("name");
      // this.userImage="http://127.0.0.1:9000/"+params.get("image");

      //第2种方式获得 使用缓存技术
      let oginUserInfo=localStorage.getItem("loginUserInfo");
      //json字符串转换成对象
      let userObj=JSON.parse(oginUserInfo);
      this.userName=userObj.name;
      this.userImage="http://127.0.0.1:9000/"+userObj.image;
    },
  })
</script>
</body>

</html>